home *** CD-ROM | disk | FTP | other *** search
- /* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
-
-
- #if defined(_NO_PROTOTYPE) /* Old, crufty environment */
- #include <oldstyle/stdlib.h>
- #elif defined(_XOPEN_SOURCE) || defined(_XPG4_VERS) /* Xpg4 environment */
- #include <xpg4/stdlib.h>
- #elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) /* Posix environment */
- #include <posix/stdlib.h>
- #elif _STRICT_ANSI /* Pure Ansi/ISO environment */
- #include <ansi/stdlib.h>
- #elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
- #include <ods_30_compat/stdlib.h>
- #else /* Normal, default environment */
- /*
- * Copyright (C) 1984-1995 The Santa Cruz Operation, Inc.
- * All Rights Reserved.
- *
- * The information in this file is provided for the exclusive use of
- * the licensees of The Santa Cruz Operation, Inc. Such users have the
- * right to use, modify, and incorporate this code into other products
- * for purposes authorized by the license agreement provided they include
- * this notice and the associated copyright notice with any such product.
- * The information in this file is provided "AS IS" without warranty.
- */
-
- /* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
- /* Portions Copyright (c) 1979 - 1990 AT&T */
- /* All Rights Reserved */
-
- /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
- /* UNIX System Laboratories, Inc. */
- /* The copyright notice above does not evidence any */
- /* actual or intended publication of such source code. */
-
- #ifndef _STDLIB_H
- #define _STDLIB_H
-
- #pragma comment(exestr, "xpg4plus @(#) stdlib.h 20.1 94/12/04 ")
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #pragma pack(4)
-
- #ifndef _DIV_T
- #define _DIV_T
- typedef struct
- {
- int quot;
- int rem;
- } div_t;
- #endif
-
- #ifndef _LDIV_T
- #define _LDIV_T
- typedef struct
- {
- long quot;
- long rem;
- } ldiv_t;
- #endif
-
- #ifndef _SIZE_T
- #define _SIZE_T
- typedef unsigned int size_t;
- #endif
-
- #if !defined(_SSIZE_T)
- #define _SSIZE_T
- typedef int ssize_t;
- #endif
-
- #ifndef _WCHAR_T
- #define _WCHAR_T
- typedef long wchar_t;
- #endif
-
- #ifndef NULL
- #define NULL 0
- #endif /* NULL */
-
- #define EXIT_FAILURE 1
- #define EXIT_SUCCESS 0
- #define RAND_MAX 077777
-
-
- /* From sys/wait.h */
- #define WNOHANG 0001
- #define WUNTRACED 0002
- #define WEXITSTATUS(sv) ((sv >> 8) & 0xff)
- #define WIFEXITED(sv) ((sv & 0xff) == 0)
- #define WIFSIGNALED(sv) ((sv) && (sv == (sv & 0x00ff)))
- #define WIFSTOPPED(sv) ((sv & 0xff) == 0177)
- #define WSTOPSIG(sv) ((sv >> 8) & 0xff)
- #define WTERMSIG(sv) (sv & 0x7f)
-
-
- extern unsigned char __ctype[];
-
- #define MB_CUR_MAX ((int)__ctype[520])
-
- extern double atof(const char *);
- extern int atoi(const char *);
- extern long atol(const char *);
- extern double strtod(const char *, char **);
- extern float strtof(const char *, char **);
- extern long strtol(const char *, char **, int);
- extern unsigned long strtoul(const char *, char **, int);
-
- extern int rand(void);
- extern void srand(unsigned int);
-
- extern void *calloc(size_t, size_t);
- extern void free(void *);
- extern void *malloc(size_t);
- extern void *realloc(void *, size_t);
-
- extern void abort(void);
- extern int atexit(void (*)(void));
- extern void exit(int);
- extern char *getenv(const char *);
- extern int system(const char *);
-
- extern void *bsearch(const void *, const void *, size_t, size_t,
- int (*)(const void *, const void *));
- extern void qsort(void *, size_t, size_t,
- int (*)(const void *, const void *));
-
- #ifdef __cplusplus
- #ifndef _ABS_INL
- #define _ABS_INL
- inline int (abs)(int i) {return (i > 0) ? i : -i;}
- #endif
- #else
- extern int (abs)(int); /* Protect from macro definitions */
- #endif
-
- extern div_t div(int, int);
- extern long labs(long);
- extern ldiv_t ldiv(long, long);
-
- extern int mbtowc(wchar_t *, const char *, size_t);
- extern int mblen(const char *, size_t);
- extern int wctomb(char *, wchar_t);
-
- extern size_t mbstowcs(wchar_t *, const char *, size_t);
- extern size_t wcstombs(char *, const wchar_t *, size_t);
-
-
- extern long a64l(const char *);
- extern int dup2(int, int);
- extern char *ecvt(double, int, int *, int *);
- extern char *ecvtl(long double, int, int *, int *);
- extern char *fcvt(double, int, int *, int *);
- extern char *fcvtl(long double, int, int *, int *);
- extern char *getcwd(char *, size_t);
- extern char *getlogin(void);
- extern int getopt(int, char *const *, const char *);
- extern int getsubopt(char **, char *const *, char **);
- extern char *initstate(unsigned, char *, int);
- extern int grantpt(int);
- extern char *optarg;
- extern int optind, opterr, optopt;
- extern char *getpass(const char *);
- extern int getpw(int, char *);
- extern char *gcvt(double, int, char *);
- extern char *gcvtl(long double, int, char *);
- extern int isatty(int);
- extern void l3tol(long *, const char *, int);
- extern char *l64a(long);
- extern char *l64a_r(long, char *, size_t);
- extern void ltol3(char *, const long *, int);
- extern void *memalign(size_t, size_t);
- extern char *mktemp(char *);
- extern int mkstemp(char *);
- extern char *ptsname(int);
- extern long random(void);
- extern int rand_r(unsigned int *);
- extern char *realpath(const char *, char *);
- extern char *setstate(char *);
- extern void srandom(unsigned);
- extern long double strtold(const char *, char **);
- extern void swab(const void *, void *, ssize_t);
- extern char *ttyname(int);
- extern int ttyslot(void);
- extern int unlockpt(int);
- extern void *valloc(size_t);
- extern double wcstod(const wchar_t *, wchar_t **);
- extern float wcstof(const wchar_t *, wchar_t **);
- extern long wcstol(const wchar_t *, wchar_t **, int);
- extern long double wcstold(const wchar_t *, wchar_t **);
- extern unsigned long wcstoul(const wchar_t *, wchar_t **, int);
-
-
-
- extern double drand48(void);
- extern double erand48(unsigned short *);
- extern long jrand48(unsigned short *);
- extern void lcong48(unsigned short *);
- extern long lrand48(void);
- extern long mrand48(void);
- extern long nrand48(unsigned short *);
- extern int putenv(const char *);
- extern unsigned short *seed48(unsigned short *);
- extern void setkey(const char *);
- extern void srand48(long);
-
-
-
- #define mblen(s, n) mbtowc((wchar_t *)0, s, n)
-
- #ifdef __cplusplus
- }
- #endif
-
- #pragma pack()
-
- #endif /* _STDLIB_H */
- #endif
- #if defined(__cplusplus) || defined(__USE_FIXED_PROTOTYPES__)
- #ifdef __cplusplus
- extern "C" {
- #endif
- extern int abs (int);
- #ifdef __cplusplus
- }
- #endif
- #endif /* defined(__cplusplus) || defined(__USE_FIXED_PROTOTYPES__*/
-